17. Potential Field
Potential Field
Onto the last discretization method that you will be learning in this lesson - potential field method. Unlike the methods discussed thus far that discretize the continuous space into a connected graph, the potential field method performs a different type of discretization.
To accomplish its task, the potential field method generates two functions - one that attracts the robot to the goal and one that repels the robot away from obstacles. The two functions can be summed to create a discretized representation. By applying an optimization algorithm such as gradient descent, a robot can move toward the goal configuration while steering around obstacles. Let’s look at how each of these steps is implemented in more detail.
Attractive Potential Field
The attractive potential field is a function with the global minimum at the goal configuration. If a robot is placed at any point and required to follow the direction of steepest descent, it will end up at the goal configuration. This function does not need to be complicated, a simple quadratic function can achieve all of the requirements discussed above.
Where \textbf{x} represents the robot’s current position, and \textbf{x}_{goal} the goal position. \nu is a scaling factor.
A fragment of the attractive potential field is displayed in the image below.
Repulsive Potential Field
The repulsive potential field is a function that is equal to zero in free space, and grows to a large value near obstacles. One way to create such a potential field is with the function below.
Where the function \rho(\textbf{x}) returns the distance from the robot to its nearest obstacle, \rho_0 is a scaling parameter that defines the reach of an obstacle’s repulsiveness, and \nu is a scaling parameter.
An image of a repulsive potential field for an arbitrary configuration space is provided below.
The value \rho_0 controls how far from an obstacle the potential field will be non-zero, and how steep the area surrounding an obstacle will be.
Past \rho_0, the potential field is zero. Within a \rho_0 distance of the obstacle, the potential field scales with proximity to the obstacle.
Potential Field Sum
The attractive and repulsive functions are summed to produce the potential field that is used to guide the robot from anywhere in the space to the goal. The image below shows the summation of the functions, and the image immediately after displays the final function.
Imagine placing a marble onto the surface of the function - from anywhere in the field it will roll in the direction of the goal without colliding with any of the obstacles (as long as \rho_0 is set appropriately)!
The gradient of the function dictates which direction the robot should move, and the speed can be set to be constant or scaled in relation to the distance between the robot and the goal.
Problems with the Potential Field Method
The potential field method is not without its faults - the method is neither complete nor optimal. In certain environments, the method will lead the robot to a local minimum, as opposed to the global minimum. The images below depict one such instance. Depending on where the robot commences, it may be led to the bottom of the smile.
The image below depicts the configuration space, and the following image displays the corresponding potential field.
The problem of a robot becoming stuck in a local minimum can be resolved by adding random walks, and other strategies that are commonly applied to gradient descent, but ultimately the method is not complete.
The potential field method isn’t optimal either, as it may not always find the shortest (or cheapest) path from start to goal. The shortest path may not follow the path of steepest descent. In addition, potential field does not take into consideration the cost of every step.